<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'abnormalMortgageBatch.label', default: 'AbnormalMortgageBatch')}"/>
    <title>资产包待办详情(催收页)</title>
    <style>
    .table>tbody>tr>td{
        vertical-align: middle;
    }
    @media screen and (min-width:1900px) and (max-width:1920px) {
        .flex{
            display: flex;justify-content: center;align-items: center;
        }
    }
    .select2-container .select2-choices .select2-search-field input,.select2-container .select2-choice,.select2-container .select2-choices{

        color: #999;
    }
    </style>
</head>

<body class="fixed-navbar fixed-sidebar">

<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right navFloatRight">
                <ol class="hbreadcrumb breadcrumb">
                     <li><span>CINDATA PLS</span></li>
                    <li class="">
                        <span>资产包待办</span>
                    </li>
                    <li class="active">
                        <span>资产包待办详情</span>
                    </li>
                </ol>
            </div>
        </div>
    </div>
</div>
<g:if test="${flash.message}">
    <div class="message alert alert-info" role="status">${flash.message}</div>
</g:if>

<div class="content animate-panel">

    <div class="row">
        <div class="hpanel hgreen contact-panel">
            <div class="panel-heading">
                <div class="panel-tools">
                </div>
                资产包基本信息
            </div>

            <div class="panel-body">
                <div class="text-muted font-bold m-b-xs ol-md-6">
                    <div class="col-md-12">
                        <div class="col-md-9">
                            <h4>
                                资产包 ${this.abnormalMortgageBatch?.name}
                            </h4>
                        </div>
                      </div>
                    </div>
                </div>
                <div class="panel-footer contact-footer">
                  <div class="row">
                    <div class="col-md-2">
                      <div class="contact-stat border-right">
                        <span>处置方式</span>
                        <strong>${this.abnormalMortgageBatch?.disposeMethod}</strong>
                      </div>
                    </div>
                    <div class="col-md-2">
                      <div class="contact-stat border-right">
                        <span>资产类型</span>
                        <strong>${this.abnormalMortgageBatch?.type}</strong>
                      </div>
                    </div>
                    <div class="col-md-2">
                      <div class="contact-stat border-right">
                        <span>工作流</span>
                        <strong>${this.abnormalMortgageBatch?.workflow?.name}</strong>
                      </div>
                    </div>
                    <div class="col-md-2">
                      <div class="contact-stat border-right">
                        <span>计划时间</span>
                        <strong><g:formatDate date="${this.abnormalMortgageBatch?.startTime}" format="yyyy-MM-dd HH:mm:ss" ></g:formatDate>~<g:formatDate date="${this.abnormalMortgageBatch?.endTime}" format="yyyy-MM-dd HH:mm:ss" ></g:formatDate></strong>
                      </div>
                    </div>
                    <div class="col-md-2">
                      <div class="contact-stat border-right">
                        <span>处置部门</span>
                        <strong>${this.abnormalMortgageBatch?.disposalDepartment?.name}</strong>
                      </div>
                    </div>
                    <div class="col-md-2">
                      <div class="contact-stat border-right">
                        <span>处置人员</span>
                        <strong>${this.abnormalMortgageBatch?.disposalUser?.fullName}</strong>
                      </div>
                  </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <g:form method="POST" action="show" id="${this.abnormalMortgageBatch?.id}" class="form-horizontal" role="form">
        <div class="hpanel hblue">
            <div class="panel-heading">
                <div class="panel-tools">
                    <button class="btn btn-primary btn-xs" type="submit" onclick=""><i class="fa fa-search"></i> 查询</button>
                    <button class="btn btn-warning2 btn-xs" type="button" id="resetBtn">
                        <i class="fa fa-times"></i> 重置</button>
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                查询
            </div>
            <div class="panel-body seach-group" id="bug1">
                %{--第一行--}%
                <div class="row">
                    <div class="form-group col-sm-4">
                        <label for="city" class="col-sm-3 control-label">城市</label>
                        <div class="col-sm-9">
                            <g:select class="form-control" name="city" id="city"
                                      from="${com.cindata.City.findAllByNameInList(new com.cindata.ComponentService().evaluate(com.cindata.Component.findByCode('showCity')), [sort: 'name', order: 'asc'])}"
                                      valueMessagePrefix="status" optionKey="zoneNumber" optionValue="name"
                                      value="${params?.city}"
                                      noSelection="${["-1": '请选择城市']}"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label" for="loansDuration">贷款时长</label>
                        <div class="col-sm-9">
                            <g:select class="form-control" name="loansDuration" id="loansDuration"
                                      from="${com.cindata.dimension.YearLimitDimension.list()}"
                                      valueMessagePrefix="status" optionKey="label" optionValue="label"
                                      value="${params?.loansDuration}"
                                      noSelection="${["": '请选择贷款时长']}"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label">贷款金额</label>
                        <div class="col-sm-7 input-group ">
                            <input type="text" class=" form-control " placeholder="请输入下限" maxlength="6"
                                   id="loansAmountStart" value="${params?.loansAmountStart}" name="loansAmountStart" />
                            <span class="input-group-addon">至</span>
                            <input type="text" class=" form-control " placeholder="请输入上限" maxlength="6"
                                   id="loansAmountEnd" value="${params?.loansAmountEnd}" name="loansAmountEnd" />
                        </div>
                        <div class="col-sm-2 p-t-xss">
                            万元
                        </div>
                    </div>
                </div>
                %{--第二行--}%
                <div class="row">
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label">贷款编号</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" name="serialNumber" id="serialNumber" value="${params?.serialNumber}" placeholder="请输入贷款编号">
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label">贷款状态</label>
                        <div class="col-sm-9">
                            <g:select class="form-control" name="mortgageStatus" id="mortgageStatus"
                                      from="${com.cindata.dictionary.MortgageStatusDict.list()}"
                                      valueMessagePrefix="status" optionKey="id" optionValue="name"
                                      value="${params?.mortgageStatus}"
                                      noSelection="${["": '请选择贷款状态']}"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label">贷款余额</label>
                        <div class="col-sm-7  input-group">
                            <input type="text" class=" form-control "
                                   placeholder="请输入下限" id="loansBalanceStart" maxlength="6"
                                   value="${params?.loansBalanceStart}" name="loansBalanceStart" />
                            <span class="input-group-addon">至</span>
                            <input type="text" class="form-control " placeholder="请输入上限" maxlength="6"
                                   id="loansBalanceEnd"  value="${params?.loansBalanceEnd}" name="loansBalanceEnd" />
                        </div>
                        <div class="col-sm-2 p-t-xss">
                            万元
                        </div>
                    </div>
                </div>
                %{--第三行--}%
                <div class="row">
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label">受理网点</label>
                        <div class="col-sm-9">
                            <g:select class="form-control" name="accountId" id="accountId"
                                      from="${accountManageAccountList}"
                                      valueMessagePrefix="status" optionKey="id" optionValue="name"
                                      value="${params?.accountId}"
                                      noSelection="${["": '请选择受理网点名称']}"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label" for="loansDuration">抵押类型</label>
                        <div class="col-sm-9">
                            <g:select class="form-control" name="mortgageType" id="mortgageType"
                                      from="${com.cindata.dictionary.MortgageType.list()}"
                                      valueMessagePrefix="status" optionKey="id" optionValue="name"
                                      value="${params?.mortgageType}"
                                      noSelection="${["": '请选择抵押类型']}"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label">放款时间</label>
                        <div class="col-sm-9 input-daterange input-group p-r-n"  id="datepicker" style="width: 75%;">
                            <input type="text" class=" form-control " placeholder="请选择放款时间"
                                   value="${params?.startDateStart}" name="startDateStart" id="startDateStart" style="text-align: left" />
                            <span class="input-group-addon">至</span>
                            <input type="text" class=" form-control " placeholder="请选择结束时间"
                                   value="${params?.startDateEnd}" name="startDateEnd" id="startDateEnd" style="text-align: left" />
                        </div>
                    </div>
                </div>
                %{--第四行--}%
                <div class="row">
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label" for="loansDuration">贷款方式</label>
                        <div class="col-sm-9">
                            <g:select class="form-control" name="mortgagePattern" id="mortgagePattern"
                                      from="${com.cindata.dictionary.MortgagePattern.list()}"
                                      valueMessagePrefix="status" optionKey="id" optionValue="name"
                                      value="${params?.mortgagePattern}"
                                      noSelection="${["": '请选择贷款方式']}"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label class="col-sm-3 control-label">关注等级</label>
                        <div class="col-sm-9">
                            <g:select class="form-control" name="riskWarningLevel" id="riskWarningLevel"
                                          from="${com.cindata.RiskWarningLevel.list()}"
                                          valueMessagePrefix="status" optionKey="id" optionValue="name"
                                          value="${params?.riskWarningLevel}"
                                          noSelection="${["": '请选择关注等级']}"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </g:form>
    </div>

    <div class="row">
        <div class="hpanel hgreen">
          <div class="panel-heading">
              <div class="panel-tools">
                  <a class="showhide"><i class="fa fa-chevron-up"></i></a>
              </div>
              资产信息
          </div>

            <div class="panel-body no-padding">
                <div class="table-responsive">
                    <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" id="esateTable">
                        <thead>
                        <tr>
                            <g:sortableColumn property="serialNumber" title="贷款编号" class="col-md-1 text-center" params="${params}"/>
                            <g:sortableColumn property="city" title="城市" class="col-md-1 text-center" params="${params}"/>
                            <g:sortableColumn property="guaranteeInstitution" title="担保机构" class="col-md-1 text-center" params="${params}"/>
                            <g:sortableColumn property="mortgageCategory" title="贷款类型" class="col-md-1 text-center" params="${params}"/>
                            <g:sortableColumn property="mortgageType" title="抵押类型" class="col-md-1 text-center" params="${params}"/>
                            <g:sortableColumn property="mortgagePattern" title="贷款方式" class="col-md-1 text-center" params="${params}"/>
                            <g:sortableColumn property="mortgageStatus" title="贷款状态" class=" col-md-1 text-center" params="${params}"/>
                            <!-- <g:sortableColumn property="isNonPerformingLoan" title="是否不良" class=" col-md-1 text-center" params="${params}"/> -->
                            <g:sortableColumn property="loansAmount" title="贷款金额"  class="col-md-1 text-center" params="${params}"/>
                            <g:sortableColumn property="loansBalance" title="贷款余额" class="col-md-1 text-center"  params="${params}"/>
                            <g:sortableColumn property="startDate" title="放款时间" class="col-md-1 text-center"  params="${params}"/>
                            <g:sortableColumn property="account" title="受理网点" class=" col-md-1 text-center" params="${params}"/>
                            <g:sortableColumn property="riskWarningLevel" title="关注等级" class=" col-md-1 text-center" params="${params}"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${batchMortgageList}">
                            <tr>
                                <td><g:link style="color: #3498DB" class="firstTd" id="${it?.mortgage?.id}" controller="mortgage" action="show">${it?.mortgage?.serialNumber}</g:link></td>
                                <td>${it?.mortgage?.account?.city?.name ? it?.mortgage?.account?.city?.name : '-'}</td>
                                <td>${it?.mortgage?.guaranteeInstitution? it?.mortgage?.guaranteeInstitution?.name : '-'}</td>
                                <td>${it?.mortgage?.mortgageCategory? it?.mortgage?.mortgageCategory?.name : '-'}</td>
                                <td>${it?.mortgage?.mortgageType? it?.mortgage?.mortgageType?.name : '-'}</td>
                                <td>${it?.mortgage?.mortgagePattern? it?.mortgage?.mortgagePattern?.name : '-'}</td>
                                <td>${it?.mortgage?.mortgageStatus?.name ? it?.mortgage?.mortgageStatus?.name : '-'}</td>
                                <!-- <td>${it?.mortgage?.isNonPerformingLoan ? '是':'否'}</td> -->
                                <td>${it?.mortgage?.loansAmount ? it?.mortgage?.loansAmount : ''}</td>
                                <td>${it?.mortgage?.loansBalance ? it?.mortgage?.loansBalance : '-'}</td>
                                <td>
                                    <g:if test="${it?.mortgage?.startDate}">
                                        <g:formatDate date="${it?.mortgage?.startDate}" format="yyyy-MM-dd"></g:formatDate>
                                    </g:if>
                                    <g:else>
                                        -
                                    </g:else>
                                </td>
                                <td>${it?.mortgage?.account?.name?it?.mortgage?.account?.name:'-'}</td>
                                <td>${it?.mortgage?.riskWarningLevel?.name?it?.mortgage?.riskWarningLevel?.name:'-'}</td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="panel-footer">
                <div class="pagination">
                    <g:paginate action="show" total="${batchMortgageCount ?: 0}" params="${params}"/>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="hpanel hgreen collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <sec:ifAllGranted roles="ROLE_CUSTOMER_MANAGER">
                        <g:link class="btn btn-info btn-xs" controller="attachment" action="create" params="[abnormalMortgageBatch: this?.abnormalMortgageBatch?.id]"><i class="fa fa-upload"></i>上传</g:link>
                    </sec:ifAllGranted>
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                附件信息
            </div>

            <div class="panel-body no-padding">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="horange">
                            <div class="panel-body float-e-margins" style="border-top: none;">
                                <g:each in="${com.cindata.dictionary.AttachmentType.list()}">
                                    <g:link target=" _blank" class="btn btn-outline btn-primary" controller="attachment" action="abnormalMortgageBatchShow" id="${this.abnormalMortgageBatch.id}"
                                            params="[attachmentTypeName: it?.name]">${it?.name}</g:link>
                                </g:each>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="hpanel hgreen collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                工作流
            </div>

            <div class="panel-body no-padding">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <g:sortableColumn property="name" title="名称"/>
                            <g:sortableColumn property="workflow" title="工作流"/>
                            <g:sortableColumn property="stage" title="当前阶段"/>
                            <g:sortableColumn property="status" title="当前状态"/>
                            <g:sortableColumn property="createdDate" title="创建时间"/>
                            <g:sortableColumn property="modifiedDate" title="修改时间"/>
                            <g:sortableColumn colspan="2" class="text-center" property="comments" title="操作"/>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>
                                <g:link controller="workflowInstance" action="show" id="${workflowInstance?.id}">${workflowInstance?.name}</g:link>
                            </td>
                            <td>${workflowInstance?.workflow?.name}</td>
                            <td>${workflowInstance?.stage?.name}</td>
                            <td>${workflowInstance?.status?.name}</td>
                            <td>${workflowInstance?.createdDate}</td>
                            <td>${workflowInstance?.modifiedDate}</td>
                            <td class="text-center">
                                <g:link class="btn btn-info btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'abnormalMortgageBatch']"
                                        action="reject"><i class="fa fa-arrow-up"></i> 上一步</g:link>
                                <g:link class="btn btn-info btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'abnormalMortgageBatch']"
                                        action="approve"><i class="fa fa-arrow-down"></i> 下一步</g:link>
                                <g:link class="btn btn-danger btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'abnormalMortgageBatch']"
                                        action="cancel"><i class="fa fa-exclamation-circle"></i> 失败</g:link>
                                <g:link class="btn btn-success btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'abnormalMortgageBatch']"
                                        action="complete"><i class="fa fa-check"></i> 完成</g:link>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="hpanel hviolet collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                机构信息
            </div>

            <div class="panel-body no-padding">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                          <g:sortableColumn property="type" title="机构类型"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="name" title="机构名称"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="city" title="城市"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="district" title="行政区"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="contact" title="机构联系人"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="phone" title="机构联系方式"  class="text-center" params="${params}"/>
                        </tr>
                        </thead>
                        <tbody>
                            <g:each in="${com.cindata.BatchAccount.findAllByAbnormalMortgageBatch(this?.abnormalMortgageBatch)}">
                                <tr class="text-center">
                                  <td>${it?.account?.type?.name}</td>
                                    <td>${it?.account?.name}</td>
                                    <td>${it?.account?.city?.name}</td>
                                    <td>${it?.account?.district?.name}</td>
                                    <td>${it?.account?.contact}</td>
                                    <td>${it?.account?.phone}</td>

                                </tr>
                            </g:each>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    %{--催收信息--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <g:if test="${approveRoleFlag}">
                        <g:link controller="mortgageCollectionRecord" action="create1" id="${abnormalMortgageBatch?.id}"  class="btn btn-info btn-xs"><i class="fa fa-plus"></i>新建</g:link>
                    </g:if>
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                催收处置信息
            </div>
            <div class="panel-body no-padding" style="overflow-x:scroll;">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>催收类型</th>
                        <th>催收时间</th>
                        <th>催收部门</th>
                        <g:if test="${abnormalMortgageBatch?.disposalDepartment?.name=='委外部'}">
                        <th>委外机构</th>
                        </g:if>
                        <th>催收负责人</th>
                        <th>客户约定还款计划</th>
                        <th>逾期还款后果提示</th>
                        <th>逾期原因</th>
                        <th>催收结果</th>
                    </tr>
                    </thead>
                    <tbody>
                    <g:each in="${com.cindata.MortgageCollectionRecord.findAllByAbnormalMortgageBatch(abnormalMortgageBatch)?.sort{a, b -> a.modifiedDate > b.modifiedDate ? -1 : 1 }}">
                        <tr>
                        <td><g:link style="color: #3498DB" class="firstTd" id="${it?.id}" controller="mortgageCollectionRecord" action="abnormalMortgageBatchShow" params="[abnormalMortgageBatch: abnormalMortgageBatch?.id]">${it?.collectionType?.name}</g:link></td>
                            <td><g:formatDate date="${it?.createdDate}" format="yyyy-MM-dd" ></g:formatDate></td>
                            <td>${it?.department}</td>
                            <g:if test="${abnormalMortgageBatch?.disposalDepartment?.name=='委外部'}">
                            <td>${it?.agencyAccount?.name}</td>
                            </g:if>
                            <td>${it?.fullName}</td>
                            <td>${it?.repaymentPlan}</td>
                            <td>${it?.isRemindedConsequence?'已提示':'未提示'}</td>
                            <td>${it?.reasonOfOverdue}</td>
                            <td>${it?.collectionResult}</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    %{--诉讼信息--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                诉讼处置信息
            </div>
            <div class="panel-body no-padding" style="overflow-x:scroll;">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>代偿金额</th>
                        <th>代偿时间</th>
                        <th>案号</th>
                        <th>申诉人</th>
                        <th>立案时间</th>
                        <th>开庭时间</th>
                        <th>法院</th>
                        <th>审判时间</th>
                        <th>审判结果</th>
                        <th>上诉人</th>
                        <th>被上诉人</th>
                        <th>上诉日期</th>
                        <th>执行案号</th>
                        <th>执行结果</th>
                        <th>起拍价格</th>
                        <th>竞拍结果</th>
                        <th>拍卖处置</th>
                    </tr>
                    </thead>
                    <tbody>
                    <g:each in="${com.cindata.MortgageLitigationRecord.findAllByAbnormalMortgageBatch(abnormalMortgageBatch)}">
                        <tr>
                            <td><g:link style="color: #3498DB" class="firstTd" id="${it?.id}" controller="mortgageLitigationRecord" action="litigation" params="[page:'litigationBatch']">${it?.id}</g:link></td>
                            <td>${it?.compensatoryMoney}</td>
                            <td><g:formatDate date="${it?.compensatoryDate}" format="yyyy-MM-dd" ></g:formatDate></td>
                            <td>${it?.caseNumber}</td>
                            <td>${it?.appeals}</td>
                            <td><g:formatDate date="${it?.filingDate}" format="yyyy-MM-dd" ></g:formatDate></td>
                            <td><g:formatDate date="${it?.courtDate}" format="yyyy-MM-dd" ></g:formatDate></td>
                            <td>${it?.court}</td>
                            <td><g:formatDate date="${it?.judgmentDate}" format="yyyy-MM-dd" ></g:formatDate></td>
                            <td>${it?.judgmentResult}</td>
                            <td>${it?.appellant}</td>
                            <td>${it?.appellee}</td>
                            <td><g:formatDate date="${it?.appealDate}" format="yyyy-MM-dd" ></g:formatDate></td>
                            <td>${it?.executeCaseNumber}</td>
                            <td>${it?.executeResult}</td>
                            <td>${it?.startPrice}</td>
                            <td>${it?.auctionResult}</td>
                            <td>${it?.auctionDisposal}</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>

<div class="modal fade hmodal-success" id="myModal7" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog">
        <g:form action="disposalSave1" method="post" class="disposqlForm">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">作业部门</h4>
                </div>
                <div class="modal-body modalHeight">
                    <div class="form-horizontal">

                        <input type="hidden" id="abnormalMortgageBatch" name="abnormalMortgageBatch" value="${abnormalMortgageBatch?.id}"/>

                        <div class="form-group" style="margin-bottom: 0;">
                            <label class="col-md-2 control-label is-required" >作业部门</label>
                            <div class="col-md-6 " style="display: flex;align-items: center;">
                                <g:select class="form-control" name="department" id="department" from="${com.cindata.Department.list()}" optionKey="id" optionValue="name" value="${riskWarning?.department?.id}" noSelection="${['': '请选择作业部门']}"/>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-success disposqlBtn">
                        <span>开始处置</span>
                    </button>
                    <button type="reset" class="btn btn-danger" data-dismiss="modal">
                        <span>取消处置</span>
                    </button>
                </div>
            </div>
        </g:form>
    </div>
</div>

%{--<footer class="footer bg-success" style="left: 0;bottom: 41px; padding: 5px 50px 2px 18px;">--}%
    %{--<div class="row">--}%
        %{--<div class="text-right">--}%
            %{--<g:if test="${approveRoleFlag}">--}%
                %{--<g:link class="btn btn-info btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'abnormalMortgageBatch']"--}%
                        %{--action="reject"><i class="fa fa-arrow-up"></i> 上一步</g:link>--}%
                %{--<g:link class="btn btn-info btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'abnormalMortgageBatch']"--}%
                        %{--action="approve"><i class="fa fa-arrow-down"></i> 下一步</g:link>--}%
                %{--<g:link class="btn btn-danger btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'abnormalMortgageBatch']"--}%
                        %{--action="cancel"><i class="fa fa-exclamation-circle"></i> 失败</g:link>--}%
                %{--<g:link class="btn btn-success btn-xs" controller="workflowInstance" id="${workflowInstance?.id}" params="[classType: 'abnormalMortgageBatch']"--}%
                        %{--action="complete"><i class="fa fa-check"></i> 完成</g:link>--}%
            %{--</g:if>--}%
        %{--</div>--}%
    %{--</div>--}%
%{--</footer>--}%


<g:javascript>

    $(function () {
        $('#datepicker').datepicker({
            language: 'zh-CN'
        });
        $("#datepicker").on("changeDate", function (event) {
            $("#my_hidden_input").val(
                    $("#datepicker").datepicker('getFormattedDate')
            )
        });

        $('.input-group.date').datepicker({});
        $('.input-daterange').datepicker({});
    })
$(".disposal").click(function() {
    var abnormalMortgageBatch = $(this).attr("dataId").trim();
    $("#abnormalMortgageBatch").val(abnormalMortgageBatch)
})

// 分发
$(document).delegate(".disposqlBtn", "click",
    function() {
        var abnormalMortgageBatch = $("#abnormalMortgageBatch").val();
        var department = $("#department").val();
        if (!department)
        {
            toastr.error('请选择作业部门！');
            return
        }
        swal({
            title: "是否确认提交吗?",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#3aa9dd",
            cancelButtonText: "取消",
            confirmButtonText: "确认",
            closeOnConfirm: false,
            closeOnCancel: true
        },
        function(isConfirm) {
            if (isConfirm) {
                $(".disposqlForm").submit();
                swal("提交成功！", "", "success");
            }
        });
    });

//重置按钮
$("#resetBtn").click(function () {
    $("#s2id_city span:first").html("请选择城市");
    $("#city").val("");
    $("#s2id_loansDuration span:first").html("请选择贷款时长");
    $("#loansDuration").val("");
    $("#s2id_mortgageStatus span:first").html("请选择贷款状态");
    $("#mortgageStatus").val("");
    $("#loansAmountStart").val("");
    $("#loansAmountEnd").val("");
    $("#startDateStart").val("");
    $("#startDateEnd").val("");
    $("#loansBalanceStart").val("");
    $("#loansBalanceEnd").val("");
    $("#s2id_accountId span:first").html("请选择受理网点名称");
    $("#accountId").val("");
    $("#s2id_loansDuration span:first").html("请选择贷款时长");
    $("#loansDuration").val("");
    $("#s2id_isNonPerformingLoan span:first").html("请选择是否不良");
    $("#isNonPerformingLoan").val("");
    $("#s2id_mortgagePattern span:first").html("请选择贷款方式");
    $("#mortgagePattern").val("");
    $("#s2id_mortgageType span:first").html("请选择抵押类型");
    $("#mortgageType").val("");
    $("#serialNumber").val("");
});
</g:javascript>

</body>
</html>
